﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BPM.Entity
{
	/// <summary>
	/// 成品组装定义
	/// </summary>
	public class ProductAssembleDefinition : BarcodeEntity
	{
		public ProductAssembleDefinition()
		{
			this._User = this.CreateReference<User>();
			this._Barcode = this.CreateReference<Barcode>();
		}

		private ILazyEntityRef<User> _User;
		/// <summary>
		/// 创建人(组装组长)
		/// </summary>
		public User User
		{
			get
			{
				return this._User.Entity;
			}
			set
			{
				this._User.Entity = value;
			}
		}
		/// <summary>
		/// 创建人的UserId
		/// </summary>
		public int UserId
		{
			get
			{
				return this._User.Id;
			}
			set
			{
				this._User.Id = value;
			}
		}

		private ILazyEntityRef<Barcode> _Barcode;
		/// <summary>
		/// 条码
		/// </summary>
		public Barcode Barcode
		{
			get
			{
				return this._Barcode.Entity;
			}
			set
			{
				this._Barcode.Entity = value;
			}
		}
		public int BarcodeId
		{
			get
			{
				return this._Barcode.Id;
			}
			set
			{
				this._Barcode.Id = value;
			}
		}

		/// <summary>
		/// 此定义所包含的物料的集合
		/// </summary>
		public IList<ProductAssembleDefinitionItem> ItemList { get; set; }

		/// <summary>
		/// 产品组装定义的名称
		/// </summary>
		public string Name { get; set; }
		/// <summary>
		/// 产品组装定义的描述信息
		/// </summary>
		public string Description { get; set; }
		/// <summary>
		/// 创建时间
		/// </summary>
		public DateTime CreatedTime { get; set; }
	}
}
